import Redis from './Redis';

export default {
    user: {
        id: undefined,
        name: undefined,
        roles: []
    },
    handler (context) {
        let bearer = context.ctx.request.header['authorization'];
        if (!bearer) {
            console.info('no_login');
            return 'no_login';
        }

        bearer = bearer.replace('Bearer ', '');
        console.info(bearer);
    },
    login (username, password) {

    }
};